3.149 \(\int \frac{1}{(a-a \sec ^2(c+d x))^2} \, dx\)

Optimal. Leaf size=37 \[ -\frac{\cot ^3(c+d x)}{3 a^2 d}+\frac{\cot (c+d x)}{a^2 d}+\frac{x}{a^2} \]

[Out]

x/a^2 + Cot[c + d*x]/(a^2*d) - Cot[c + d*x]^3/(3*a^2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0299385, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {4120, 3473, 8} \[ -\frac{\cot ^3(c+d x)}{3 a^2 d}+\frac{\cot (c+d x)}{a^2 d}+\frac{x}{a^2} \]

Antiderivative was successfully verified.

[In]

Int[(a - a*Sec[c + d*x]^2)^(-2),x]

[Out]

x/a^2 + Cot[c + d*x]/(a^2*d) - Cot[c + d*x]^3/(3*a^2*d)

Rule 4120

Int[(u_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[b^p, Int[ActivateTrig[u*tan[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{1}{\left (a-a \sec ^2(c+d x)\right )^2} \, dx &=\frac{\int \cot ^4(c+d x) \, dx}{a^2}\\ &=-\frac{\cot ^3(c+d x)}{3 a^2 d}-\frac{\int \cot ^2(c+d x) \, dx}{a^2}\\ &=\frac{\cot (c+d x)}{a^2 d}-\frac{\cot ^3(c+d x)}{3 a^2 d}+\frac{\int 1 \, dx}{a^2}\\ &=\frac{x}{a^2}+\frac{\cot (c+d x)}{a^2 d}-\frac{\cot ^3(c+d x)}{3 a^2 d}\\ \end{align*}

Mathematica [C]  time = 0.0267814, size = 36, normalized size = 0.97 \[ -\frac{\cot ^3(c+d x) \text{Hypergeometric2F1}\left (-\frac{3}{2},1,-\frac{1}{2},-\tan ^2(c+d x)\right )}{3 a^2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a - a*Sec[c + d*x]^2)^(-2),x]

[Out]

-(Cot[c + d*x]^3*Hypergeometric2F1[-3/2, 1, -1/2, -Tan[c + d*x]^2])/(3*a^2*d)

________________________________________________________________________________________

Maple [A]  time = 0.05, size = 47, normalized size = 1.3 \begin{align*}{\frac{\arctan \left ( \tan \left ( dx+c \right ) \right ) }{d{a}^{2}}}-{\frac{1}{3\,d{a}^{2} \left ( \tan \left ( dx+c \right ) \right ) ^{3}}}+{\frac{1}{d{a}^{2}\tan \left ( dx+c \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a-a*sec(d*x+c)^2)^2,x)

[Out]

1/d/a^2*arctan(tan(d*x+c))-1/3/d/a^2/tan(d*x+c)^3+1/d/a^2/tan(d*x+c)

________________________________________________________________________________________

Maxima [A]  time = 1.5722, size = 54, normalized size = 1.46 \begin{align*} \frac{\frac{3 \,{\left (d x + c\right )}}{a^{2}} + \frac{3 \, \tan \left (d x + c\right )^{2} - 1}{a^{2} \tan \left (d x + c\right )^{3}}}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a-a*sec(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

1/3*(3*(d*x + c)/a^2 + (3*tan(d*x + c)^2 - 1)/(a^2*tan(d*x + c)^3))/d

________________________________________________________________________________________

Fricas [B]  time = 0.472582, size = 177, normalized size = 4.78 \begin{align*} \frac{4 \, \cos \left (d x + c\right )^{3} + 3 \,{\left (d x \cos \left (d x + c\right )^{2} - d x\right )} \sin \left (d x + c\right ) - 3 \, \cos \left (d x + c\right )}{3 \,{\left (a^{2} d \cos \left (d x + c\right )^{2} - a^{2} d\right )} \sin \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a-a*sec(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

1/3*(4*cos(d*x + c)^3 + 3*(d*x*cos(d*x + c)^2 - d*x)*sin(d*x + c) - 3*cos(d*x + c))/((a^2*d*cos(d*x + c)^2 - a
^2*d)*sin(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{1}{\sec ^{4}{\left (c + d x \right )} - 2 \sec ^{2}{\left (c + d x \right )} + 1}\, dx}{a^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a-a*sec(d*x+c)**2)**2,x)

[Out]

Integral(1/(sec(c + d*x)**4 - 2*sec(c + d*x)**2 + 1), x)/a**2

________________________________________________________________________________________

Giac [B]  time = 1.20012, size = 108, normalized size = 2.92 \begin{align*} \frac{\frac{24 \,{\left (d x + c\right )}}{a^{2}} + \frac{15 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1}{a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3}} + \frac{a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 15 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{6}}}{24 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a-a*sec(d*x+c)^2)^2,x, algorithm="giac")

[Out]

1/24*(24*(d*x + c)/a^2 + (15*tan(1/2*d*x + 1/2*c)^2 - 1)/(a^2*tan(1/2*d*x + 1/2*c)^3) + (a^4*tan(1/2*d*x + 1/2
*c)^3 - 15*a^4*tan(1/2*d*x + 1/2*c))/a^6)/d